  <?php 
  $usr_nmbr = 2;
  ?>
<!DOCTYPE HTML>
<html>
	<head>
		<title>Publish</title>
        <link type = "image/x-icon" rel="SHORTCUT ICON" href="img/favicon.ico" />	
        <script type="text/javascript" src="jquery/jquery-1.7.1.min.js"></script>   
		 <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
		  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>  		
		<link rel="stylesheet" href="css/style.css" />
        <link rel="stylesheet" href="css/grid-12.css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<script src="uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
		<link rel="stylesheet" type="text/css" href="uploadify/uploadify.css">
		<?php $timestamp = time();?>
  <script>
	$(function() {
		$("#tabs").tabs();
		$('#file_upload').uploadify({
			'formData'     : {
				'timestamp' : '<?php echo $timestamp;?>',
				'token'     : '<?php echo md5('unique_salt' . $timestamp);?>'
			},
			'uploader' : 'uploadify/uploadify.php',
			'onUploadSuccess' : function(file, data, response) {
			var res = jQuery.parseJSON( data );
				if(res.message=='Success'){
					$('#photosQueue').append("<li class='photoItem'><input name='title[]' class='textbox_1' value='' /><br><img width='170' src="+res.target+" height='170' ><br><textarea name='des[]'>Description</textarea></li>");
					$('#photoSubmit').removeClass('hide');
				}
			}
		});
	
	});
  </script>
	</head>
	<body>
		<div id="container" class="container_12">
		<?php
			include("inc/db.class.php");
			include("class/Product.class.php");
			require("php/header.php");
			include("inc/functions.php");
		?>
		<div id="line" class="grid_12"></div>
			<div id="" class="grid_12">
				<h3>Submit your article or images or videos you want to publish.</h3>
<div id="tabs">
  <ul>
    <li><a href="#tabs-1">Photos</a></li>
    <li><a href="#tabs-2">Videos</a></li>
    <li><a href="#tabs-3">Article</a></li>
  </ul>
  <div id="tabs-1">

  <?php if(!isset($_SESSION['logged_in']) || !$_SESSION['logged_in']){ echo "
  					<div class='inpt_pr_cvr'>
					    <span class='label_contact_us'>Your Name</span><br />
					    <input id='name' name='name' type='text' class='textbox_3' value='' />
					    <span id='name_error' class='error'></span>
					</div> 
					<div class='inpt_pr_cvr'>
					    <span class='label_contact_us'>Your Email</span><br />
					    <input id='name' name='email' type='text' class='textbox_3' value='' />
					    <span id='email_error' class='error'></span>
					</div>";
					} ?>
			
			<div id="uploadPhotos">
			Select the files you want to upload, please hold the <b>Ctrl</b> key to select multiple files at a time.<br><br>
				<form>
					<div id="queue"></div>
					<input id="file_upload" name="file_upload" type="file" multiple="true">
				</form>
				
				<div id = "photoUploadForm">
					<form method="POST" action="post.php">
						<ul id="photosQueue">
						</ul>
						<div style="clear:both;"></div><br>
						<input type='submit' id='photoSubmit' class="hide btn2" value="Upload photos" />
					</form>
					
				</div>
				
			</div>
	
		
    </div>
  <div id="tabs-2">
   </div>
  <div id="tabs-3">
   </div>
</div>

			</div>
						
			<?php require("php/footer.php"); ?>
		</div>
	</body>
</html>
